package com.zscat.mallplus.dms.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zscat.mallplus.qsg.QsgDevice;
import com.zscat.mallplus.qsg.QsgMeal;
import com.zscat.mallplus.ums.entity.UmsMember;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 驾校订单对象
 */
@Data
@TableName("dms_order")
public class DmsOrder implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("meal_id")
    private Long mealId;

    @TableField("meal_name")
    private String mealName;

    @TableField("member_id")
    private Long memberId;

    @TableField("member_name")
    private String memberName;

    @TableField("order_status")
    private Integer orderStatus;

    @TableField("order_sn")
    private String orderSn;

    @TableField(exist = false)
    private String orderStatusName;

    @TableField("price")
    private BigDecimal price;

    @TableField
    private Long certId;

    @TableField("prepay_id")
    private String prepayId;

    @TableField(exist = false)
    private String storeName;

    @TableField("create_datetime")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createDatetime;

    @TableField("payment_datetime")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date paymentDatetime;

    @TableField(exist = false)
    private String phone;

    @TableField(exist = false)
    private String machineName;

    @TableField(exist = false)
    private String startDate;
    @TableField(exist = false)
    private String endDate;

    private BigDecimal profitSharingMoney;

    private Long deviceId;

    private String startTime;

    private String endTime;

    private Long storeId;

    private Integer duration;

    @TableField(exist = false)
    private List<QsgMeal> meals;

    @TableField(exist = false)
    private BigDecimal allMoney;

    @TableField(exist = false)
    private QsgDevice device;

    private Integer payType;

    private Integer integral;

    @TableField(exist = false)
    private String source;

    @TableField(exist = false)
    private int showStatus;

    @TableField(exist = false)
    private String status;
    @TableField(exist = false)
    private QsgMeal meal;
    @TableField(exist = false)
    private UmsMember member;

    private Integer openStatus;

    @TableField(exist = false)
    private int pageNum;

    private String wxOrderSn;

    private Integer isSharing;

    @TableField("refund_money")
    private BigDecimal refundMoney;

    @TableField("act_end_time")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date actEndTime;

    @TableField("pay_method")
    private Integer payMethod;

    private Long pId;

    @TableField(exist = false)
    private Integer orderType;
}
